import module from '../../module'

export default name => {
  const root = `${module.code}/${name}/`
  const crud = $http.crud(root)
  // 查询票价方案
  crud.fareSchemeQuery = params => {
    return $http.get('/dispatch/fare_scheme/query', params)
  }
  //新增票价方案
  crud.fareSchemeAdd = params => {
    return $http.post('/dispatch/fare_scheme/add', params)
  }
  //删除票价方案
  crud.fareSchemeDelete = params => {
    return $http.delete('/dispatch/fare_scheme/delete', params)
  }
  //修改票价方案
  crud.fareSchemeUpdate = params => {
    return $http.post('/dispatch/fare_scheme/update', params)
  }
  return {
    ...crud
  }
}
